package com.hxzy.shop.dto.convert;

import com.hxzy.shop.dto.req.AnnouncementClassificationReq;
import com.hxzy.shop.dto.resp.AnnouncementClassificationDetailResp;
import com.hxzy.shop.entity.AnnouncementClassification;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Description
 * @Author tu-jia-hao
 * @Data 2022/7/4 15:00
 */
@Mapper
public interface AnnouncementClassificationConvert {
    public static AnnouncementClassificationConvert INSTANCE= Mappers.getMapper(AnnouncementClassificationConvert.class);

    @Mapping(target = "createTime",ignore = true)
    @Mapping(target = "isDel",ignore = true)
    AnnouncementClassification toAnnouncementClassification(AnnouncementClassificationReq req);

    AnnouncementClassificationDetailResp toAnnouncementClassificationDetail(AnnouncementClassification announcementClassification);

}
